"""

文件的追加写入
"""

# 打开文件,不存在的文件
# f = open("D:/Python测试/test.txt", "a", encoding="UTF-8")
# # write写入
# f.write("你好")
#
# # flush刷新
# f.flush()
#
# # close关闭
# f.close()

# 打开一个存在的文件
f = open("D:/Python测试/test.txt", "a", encoding="UTF-8")

# write写入,flush刷新
f.write("\nPython")
# close关闭
f.close()
